package com.jjyu.service.impl;

import com.jjyu.dao.FeedbackMapper;
import com.jjyu.entity.Feedback;
import com.jjyu.service.FeedbackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class FeedbackServiceImpl implements FeedbackService {

    @Autowired
    private FeedbackMapper feedbackMapper;

    @Override
    public void addFeedback(Feedback feedback) {
        feedbackMapper.insert(feedback);
    }

    @Override
    public Feedback getFeedbackById(int feedbackId) {
        return feedbackMapper.getFeedbackById(feedbackId);
    }

    @Override
    public void updateFeedback(Feedback feedback) {
        feedbackMapper.updateById(feedback);
    }

    @Override
    public void deleteFeedback(int feedbackId) {
        feedbackMapper.deleteById(feedbackId);
    }
}